<!DOCTYPE html>
<html lang="en">

<!-- Head tag (contains Google-Analytics、Baidu-Tongji)-->
<head>
  <!-- Google Analytics -->
  

  <!-- Baidu Tongji -->
  

  <!-- Baidu Push -->
  
    <script>
      (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
          bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
          bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
      })();
    </script>
  

  <meta charset="utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>

  <meta name="google-site-verification" content="lxDfCplOZbIzjhG34NuQBgu2gdyRlAtMB4utP5AgEBc"/>
  <meta name="baidu-site-verification" content="PpzM9WxOJU"/>

  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <meta name="description" content="It&#39;s if&#39;s blog..."/>
  <meta name="keyword" content="if的小世界,livemylife,is&#39;s blog,Blog,blog"/>
  <link rel="shortcut icon" href="/img/avatar/if.png"/>

  <!-- Place this tag in your head or just before your close body tag. -->
  <script async="async" defer="defer" src="https://buttons.github.io/buttons.js"></script>

  
    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/css/beantech.min.css"/>

    <!-- Pygments Highlight CSS -->
    <link rel="stylesheet" href="/css/highlight.css"/>
    <link rel="stylesheet" href="/css/widget.css"/>
    <link rel="stylesheet" href="/css/rocket.css"/>
    <link rel="stylesheet" href="/css/signature.css"/>
    <link rel="stylesheet" href="/css/catalog.css"/>
    <link rel="stylesheet" href="/css/livemylife.css"/>

    
      <!-- wave start -->
      <link rel="stylesheet" href="/css/wave.css"/>
      <!-- wave end -->
    

    
      <!-- top start (article top hot config) -->
      <link rel="stylesheet" href="/css/top.css"/>
      <!-- top end -->
    

    
      <!-- ThemeColor start -->
      <link rel="stylesheet" href="/css/scroll.css"/>
      <!-- ThemeColor end -->
    

    
      <!-- viewer start (Picture preview) -->
      <link rel="stylesheet" href="/css/viewer.min.css"/>
      <!-- viewer end -->
    

    
      <!-- Search start -->
      <link rel="stylesheet" href="/css/search.css"/>
      <!-- Search end -->
    

    
      <!-- ThemeColor start -->
      <link rel="stylesheet" href="/css/themecolor.css"/>
      <!-- ThemeColor end -->
    

    

    
  

  <!-- Custom Fonts -->
  <!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
  <!-- Hux change font-awesome CDN to qiniu -->
  <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.5.0/css/font-awesome.min.css" type="text/css">


  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]-->

  <!-- ga & ba script hoook -->
  <link rel="canonical" href="https://ifyyf.gitee.io/cn/Hexo-Theme-LiveMyLife/">
  <title>
    
      Hexo-Theme-LiveMyLife - if的小世界
    
  </title>
<meta name="generator" content="Hexo 5.4.0"></head>


<!-- hack iOS CSS :active style -->

	<body ontouchstart="" class="body--light body--light">


		<!-- ThemeColor -->
		
		<!-- ThemeColor -->
<style type="text/css">
  .body--light {
    --light-mode: none;
    --dark-mode: block;
  }
  .body--dark {
    --light-mode: block;
    --dark-mode: none;
  }
  i.mdui-icon.material-icons.light-mode {
    display: var(--light-mode);
  }
  i.mdui-icon.material-icons.dark-mode {
    display: var(--dark-mode);
  }
</style>
<div class="toggle" onclick="document.body.classList.toggle('body--dark')">
  <i class="fa fa-lightbulb-o"></i>
</div>
<script>
  //getCookieValue
  function getCookieValue(a) {
    var b = document.cookie.match('(^|[^;]+)\\s*' + a + '\\s*=\\s*([^;]+)');
    return b
      ? b.pop()
      : '';
  }
  let themeMode = 'light';
  if (getCookieValue('sb-color-mode') && (getCookieValue('sb-color-mode') !== themeMode)) {
    let dbody = document.body.classList;
    themeMode === 'dark' ? dbody.remove('body--dark') : dbody.add('body--dark');
  }

  //setCookieValue
  var toggleBtn = document.querySelector(".toggle");
  toggleBtn.addEventListener("click", function () {
    var e = document.body.classList.contains("body--dark");
    var cookieString = e
      ? "dark"
      : "light";
    var exp = new Date();
    exp.setTime(exp.getTime() + 3 * 24 * 60 * 60 * 1000); //3天过期
    document.cookie = "sb-color-mode=" + cookieString + ";expires=" + exp.toGMTString() + ";path=/";
  });
</script>

		

		<!-- Gitter -->
		

		<!-- Navigation (contains search)-->
		<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header page-scroll">
      <button type="button" class="navbar-toggle">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/">if的小世界</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <!-- Known Issue, found by Hux: <nav>'s height woule be hold on by its content. so, when navbar scale out, the <nav> will cover tags. also mask any touch event of tags, unfortunately. -->
    <div id="huxblog_navbar">
      <div class="navbar-collapse">
        <ul class="nav navbar-nav navbar-right">
          <li>
            <a href="/">首页</a>
          </li>

          
          
          
          
          <li>
            <a href="/about/">
              
              关于
              
              
            </a>
          </li>
          
          
          
          <li>
            <a href="/archive/">
              
              归档
              
              
            </a>
          </li>
          
          
          
          <li>
            <a href="/categories/">
              
              分类
              
              
            </a>
          </li>
          
          
          
          <li>
            <a href="/tags/">
              
              标签
              
              
            </a>
          </li>
          
          

          
          <li>
            <a class="popup-trigger">
              <span class="search-icon"></span>搜索</a>
          </li>
          

          <!-- LangSelect -->
          
          
          
          
          
        </ul>
      </div>
    </div>
    <!-- /.navbar-collapse -->
  </div>
  <!-- /.container -->
</nav>
<!-- progress -->
<div id="progress">
  <div class="line" style="width: 0%;"></div>
</div>

<script>
  // Drop Bootstarp low-performance Navbar Use customize navbar with high-quality material design animation in high-perf jank-free CSS3 implementation
  var $body = document.body;
  var $toggle = document.querySelector('.navbar-toggle');
  var $navbar = document.querySelector('#huxblog_navbar');
  var $collapse = document.querySelector('.navbar-collapse');

  $toggle.addEventListener('click', handleMagic)

  function handleMagic(e) {
    if ($navbar.className.indexOf('in') > 0) {
      // CLOSE
      $navbar.className = " ";
      // wait until animation end.
      setTimeout(function() {
        // prevent frequently toggle
        if ($navbar.className.indexOf('in') < 0) {
          $collapse.style.height = "0px"
        }
      }, 400)
    } else {
      // OPEN
      $collapse.style.height = "auto"
      $navbar.className += " in";
    }
  }
</script>


		<!-- Post Header (contains intro-header、signature、wordcount、busuanzi、waveoverlay) -->
		<!-- Modified by Yu-Hsuan Yen -->
<!-- Post Header -->

  <style type="text/css">
    .body--light {
      /* intro-header */
      --intro-header-background-image-url-home: url('/img/header_img/preview.jpg');
      --intro-header-background-image-url-post: url('/img/header_img/lml_bg.jpg');
      --intro-header-background-image-url-page: url('//img/header_img/lml_bg.jpg');
    }
    .body--dark {
      --intro-header-background-image-url-home: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url('/img/header_img/preview.jpg');
      --intro-header-background-image-url-post: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url('/img/header_img/lml_bg.jpg');
      --intro-header-background-image-url-page: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), url('//img/header_img/lml_bg.jpg');
    }

    header.intro-header {
       /*post*/
        background-image: var(--intro-header-background-image-url-post);
        /* background-image: url('/img/header_img/lml_bg.jpg'); */
      
    }

    
  </style>





<header class="intro-header">
  <!-- Signature -->
  <div id="signature">
    <div class="container">
      <div class="row">
        <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
          
          <div class="post-heading">
            <div class="tags">
              
            </div>
            <h1>Hexo-Theme-LiveMyLife</h1>
            <h2 class="subheading">README.cn.md</h2>
            <span class="meta">
              Posted by if on
              2021-09-25
            </span>


            
            <!-- WordCount start -->
            <div class="blank_box"></div>
            <span class="meta">
              Estimated Reading Time <span class="post-count">12</span> Minutes
            </span>
            <div class="blank_box"></div>
            <span class="meta">
              Words <span class="post-count">2.5k</span> In Total
            </span>
            <div class="blank_box"></div>
            <!-- WordCount end -->
            
            


          </div>
          
        </div>
      </div>
    </div>
  </div>

  
  <!-- waveoverlay start -->
  <div class="preview-overlay">
    <svg class="preview-waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto">
      <defs>
        <path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"></path>
      </defs>
      <g class="preview-parallax">
        <use xlink:href="#gentle-wave" x="48" y="0" fill=var(--gentle-wave1)></use>
        <use xlink:href="#gentle-wave" x="48" y="3" fill=var(--gentle-wave2)></use>
        <use xlink:href="#gentle-wave" x="48" y="5" fill=var(--gentle-wave3)></use>
        <use xlink:href="#gentle-wave" x="48" y="7" fill=var(--gentle-wave)></use>
      </g>
    </svg>
  </div>
  <!-- waveoverlay end -->
  

</header>



		<!-- Main Content (Post contains
	Pager、
	tip、
	socialshare、
	gitalk、gitment、disqus-comment、
	Catalog、
	Sidebar、
	Featured-Tags、
	Friends Blog、
	anchorjs、
	) -->
		<!-- Modify by Yu-Hsuan Yen -->
<!-- Post Content -->
<article>
  <div class="container">
    <div class="row">
      <!-- Post Container -->
      <div class="col-lg-8 col-lg-offset-1 col-md-10 col-md-offset-1 post-container">

        <h1>Hexo-Theme-LiveMyLife</h1>
<blockquote>
<p>移植 <a target="_blank" rel="noopener" href="https://github.com/Huxpro/huxpro.github.io">Hux Blog</a> 的主题，感谢 <a target="_blank" rel="noopener" href="https://github.com/Huxpro">Huxpro</a> 设计了如此完美的主题。</p>
<p>由 <a target="_blank" rel="noopener" href="https://v-vincen.github.io/">Vincent</a> 创建的 LiveMyLife 的主题修改来源 <a target="_blank" rel="noopener" href="https://github.com/YenYuHsuan/hexo-theme-beantech">YenYuHsuan</a>，参考主题 <a target="_blank" rel="noopener" href="https://github.com/dusign/hexo-theme-snail">dusign</a>、<a target="_blank" rel="noopener" href="https://github.com/shixiaohu2206/hexo-theme-huhu">Utone</a>，感谢 <a target="_blank" rel="noopener" href="https://github.com/dusign/hexo-theme-snail">dusign</a>、<a target="_blank" rel="noopener" href="https://github.com/shixiaohu2206/hexo-theme-huhu">Utone</a>。</p>
</blockquote>
<h2 id="仓库">仓库</h2>
<p>Gitee 仓库地址：<a target="_blank" rel="noopener" href="https://gitee.com/ifyyf/blog-by-hexo">https://gitee.com/ifyyf/blog-by-hexo</a></p>
<h3 id="预览博客-➾"><a target="_blank" rel="noopener" href="http://ifyyf.com">预览博客 ➾</a></h3>
<p><img src="https://gitee.com/ifyyf/resource/raw/ddbde8f22ebf9c26de26ecd4e8fc1459d9e643f4/QQ%E5%9B%BE%E7%89%8720211015155634.png" alt="if的小世界"></p>
<h2 id="快速开始">快速开始</h2>
<p>为了方便起见，我发布了整个项目，因此您可以按照下面的说明进行操作，然后就可以轻松自定义您自己的博客！</p>
<p>让我们开始!!!</p>
<h3 id="安装-Node-js-和-Git">安装 Node.js 和 Git</h3>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash">For Mac</span></span><br><span class="line">brew install node</span><br><span class="line">brew install git</span><br></pre></td></tr></table></figure>
<blockquote>
<p>Windows：下载 &amp; 安装 Node.js。-&gt; <a target="_blank" rel="noopener" href="https://nodejs.org/zh-cn/download/">Node.js</a></p>
<p>Windows：下载 &amp; 安装 Git。-&gt; <a target="_blank" rel="noopener" href="https://git-scm.com/download/win">Git</a></p>
</blockquote>
<h3 id="安装-Hexo">安装 Hexo</h3>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> npm install -g hexo-cli</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>什么是 <a target="_blank" rel="noopener" href="https://hexo.io/docs/">Hexo</a>?</p>
<p>Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 Markdown（或其他渲染引擎）解析文章，在几秒内，即可利用靓丽的主题生成静态网页。</p>
</blockquote>
<h3 id="设置你的博客">设置你的博客</h3>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">$</span><span class="bash"> hexo init blog</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>更多的命令 -&gt; <a target="_blank" rel="noopener" href="https://hexo.io/docs/commands">Hexo Commands</a></p>
</blockquote>
<h2 id="主题使用">主题使用</h2>
<h3 id="初始化">初始化</h3>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">cd blog</span><br><span class="line">rm -rf scaffolds source themes _config.landscape.yml _config.yml package.json yarn.lock #just keep node_modules</span><br><span class="line">git clone https://github.com/V-Vincen/hexo-theme-livemylife.git</span><br><span class="line">mv hexo-theme-livemylife/* ./</span><br><span class="line">rm -rf hexo-theme-livemylife</span><br><span class="line">npm install</span><br></pre></td></tr></table></figure>
<h3 id="设置主题">设置主题</h3>
<p>修改 <code>theme</code> 属性值，在 <code>_config.yml</code> 配置文件中。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Extensions</span></span><br><span class="line"><span class="comment">## Themes: https://hexo.io/themes/</span></span><br><span class="line"><span class="comment">## Plugins: https://hexo.io/plugins/</span></span><br><span class="line"><span class="attr">theme:</span> <span class="string">livemylife</span></span><br></pre></td></tr></table></figure>
<h3 id="启动服务">启动服务</h3>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">hexo generate # or hexo g</span><br><span class="line">hexo server   # or hexo s</span><br></pre></td></tr></table></figure>
<p>启动本地服务器。 默认访问地址 <code>http://localhost:4000/</code>。</p>
<blockquote>
<p>更多命令 -&gt; <a target="_blank" rel="noopener" href="https://hexo.io/docs/commands">Hexo Commands</a></p>
</blockquote>
<h2 id="配置">配置</h2>
<p>使用您自己的信息修改 <code>_config.yml</code> 配置文件，尤其是以下部分：</p>
<h3 id="网址信息配置">网址信息配置</h3>
<p>将以下信息替换为您自己的信息。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Site</span></span><br><span class="line"><span class="attr">title:</span> <span class="string">Live</span> <span class="string">My</span> <span class="string">Life</span></span><br><span class="line"><span class="attr">subtitle:</span> <span class="string">淡而无味也是一种味道</span></span><br><span class="line"><span class="attr">author:</span> <span class="string">Mr.Vincent</span></span><br><span class="line"><span class="attr">timezone:</span></span><br></pre></td></tr></table></figure>
<h3 id="语言国际化-i18n">语言国际化 (i18n)</h3>
<p>若要让您的网站以不同语言呈现，您可使用国际化（internationalization）功能。-&gt; 文档：<a target="_blank" rel="noopener" href="https://v-vincen.github.io/en/How-to-Use-Internationalization%EF%BC%88i18n%EF%BC%89/">How to Use Internationalization（i18n）</a></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Internationalization (i18n) Setting</span></span><br><span class="line"><span class="attr">language:</span> <span class="comment"># At present, only en、cn and tw are supported. You can customize the language，refer to `languages/en.yml`.</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">en</span></span><br><span class="line">  <span class="bullet">-</span> <span class="string">cn</span></span><br><span class="line"></span><br><span class="line"><span class="attr">langselect:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span> <span class="comment"># If open, it will automatically generation lang-select button.This button can jump in articles in different languages, but the articles must have the same name.</span></span><br><span class="line">  <span class="attr">options:</span> <span class="comment"># langselect button display options</span></span><br><span class="line">    <span class="attr">en:</span> <span class="string">English</span></span><br><span class="line">    <span class="attr">cn:</span> <span class="string">简体中文</span></span><br><span class="line">    <span class="comment"># tw: 正體中文</span></span><br><span class="line"></span><br><span class="line"><span class="attr">i18n_dir:</span> <span class="string">:lang</span>  </span><br><span class="line"><span class="attr">permalink:</span> <span class="string">:lang/:title/</span></span><br><span class="line"><span class="attr">new_post_name:</span> <span class="string">:lang/:title.md</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># hexo-generator-i18n config</span></span><br><span class="line"><span class="comment">## Docs: https://github.com/xcatliu/hexo-generator-index-i18n</span></span><br><span class="line"><span class="attr">index_generator:</span></span><br><span class="line">  <span class="attr">per_page:</span> <span class="number">10</span></span><br><span class="line">  <span class="attr">pagination_dir:</span> <span class="string">page</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">&#x27;&#x27;</span></span><br><span class="line">  <span class="attr">order_by:</span> <span class="string">-date</span></span><br><span class="line"></span><br><span class="line"><span class="attr">archive_generator:</span></span><br><span class="line">  <span class="attr">enabled:</span> <span class="literal">false</span></span><br><span class="line">  <span class="attr">per_page:</span> <span class="number">10</span></span><br><span class="line">  <span class="attr">yearly:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">monthly:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">daily:</span> <span class="literal">false</span></span><br><span class="line">  <span class="attr">order_by:</span> <span class="string">-date</span></span><br></pre></td></tr></table></figure>
<p><em>English 预览：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/langen.png" alt="en"></p>
<p><em>Chinese 预览：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/langcn.png" alt="cn"></p>
<h3 id="CDN-配置">CDN 配置</h3>
<p>JsDelivr JsDelivr是一种免费，快速，可靠和自动化的CDN，可用于开源。如何使用 Jsdelivr？-&gt; 文档：<a target="_blank" rel="noopener" href="https://v-vincen.github.io/en/Github-%E5%8A%A0%E9%80%9F%E4%BC%98%E5%8C%96/#%E5%85%8D%E8%B4%B9-CDN-%E6%8F%90%E9%80%9F-Github-%E9%9D%99%E6%80%81%E8%B5%84%E6%BA%90%E8%AE%BF%E9%97%AE">免费 CDN 提速 Github 静态资源访问</a></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># CDN Setting</span></span><br><span class="line"><span class="comment"># Docs: https://www.jsdelivr.com/?docs=gh</span></span><br><span class="line"><span class="comment"># If Github Pages deploy，you can ues jsdelivr settings</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="attr">jsdelivr:</span></span><br><span class="line">  <span class="attr">jsdelivr_url:</span> <span class="string">https://cdn.jsdelivr.net/gh/</span></span><br><span class="line">  <span class="attr">github_username:</span> <span class="string">V-Vincen</span></span><br></pre></td></tr></table></figure>
<p><strong>注意：</strong> Hexo-theme-livemylife 主题中有大量的 css、js 和 images，为了提高访问速度，主题中所有资源文件都使用了 JsDelivr CDN（内容分发）。但仅适用于 Github Pages 部署方式。-&gt; 文档：<a target="_blank" rel="noopener" href="https://v-vincen.github.io/en/How-to-apply-JsDelivr-CDN-in-Hexo-theme-livemylife-Theme/">How to apply JsDelivr CDN in Hexo-theme-livemylife Theme</a></p>
<h3 id="站点设置">站点设置</h3>
<p>将自定义图片放在 <code>img</code> 目录中。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Site settings</span></span><br><span class="line"><span class="attr">SEOTitle:</span> <span class="string">JavaDev</span> <span class="string">|</span> <span class="string">一如Java深似海</span></span><br><span class="line"><span class="attr">email:</span> <span class="string">hexo-theme-livemylife@mail.com</span></span><br><span class="line"><span class="attr">description:</span> <span class="string">&quot;It&#x27;s an IT blog...&quot;</span></span><br><span class="line"><span class="attr">keyword:</span> <span class="string">&quot;Java,v-vincen,v-vincen,livemylife,IT  blog,Blog&quot;</span></span><br><span class="line"><span class="attr">header-img:</span> <span class="string">img/header_img/newhome_bg.jpg</span></span><br><span class="line"><span class="attr">archives-img:</span> <span class="string">img/header_img/archive_bg2.jpg</span></span><br></pre></td></tr></table></figure>
<h3 id="网站图标设置">网站图标设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">favicon:</span> <span class="string">img/avatar/favicon.jpg</span></span><br></pre></td></tr></table></figure>
<h3 id="签名设置">签名设置</h3>
<p>将您的签名图片复制到 <code>&lt;root&gt;/img/signature</code> 并修改配置文件 <code>_config.yml</code>。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">signature:</span> <span class="literal">true</span>   <span class="comment"># show signature</span></span><br><span class="line"><span class="attr">signature-img:</span> <span class="string">img/signature/&lt;your-signature&gt;</span></span><br></pre></td></tr></table></figure>
<blockquote>
<p>如何制作签名 -&gt; <a target="_blank" rel="noopener" href="https://fontmeme.com/signature-fonts/">Free Online Signature</a></p>
</blockquote>
<h3 id="波浪设置">波浪设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Wave settings</span></span><br><span class="line"><span class="attr">wave:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<p><em>案例：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/wave.png" alt="wave"></p>
<h3 id="社交网络服务设置">社交网络服务设置</h3>
<p>如果您不想显示它，则可以直接将其删除。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># SNS settings</span></span><br><span class="line"><span class="comment"># RSS: true</span></span><br><span class="line"><span class="attr">github_username:</span> <span class="string">V-Vincen</span></span><br><span class="line"><span class="attr">twitter_username:</span> <span class="string">V_Vincen_</span></span><br><span class="line"><span class="attr">instagram_username:</span> <span class="string">V_Vincen_</span></span><br><span class="line"><span class="comment"># facebook_username:  yourAccount</span></span><br><span class="line"><span class="comment"># linkedin_username:  yourAccount</span></span><br><span class="line"><span class="comment"># zhihu_username: yourAccount</span></span><br><span class="line"><span class="attr">weibo_username:</span> <span class="string">WVincen</span></span><br></pre></td></tr></table></figure>
<h3 id="侧边栏设置">侧边栏设置</h3>
<p>将您的头像复制到 <code>&lt;root&gt;/img/avatar</code> 并修改配置文件 <code>_config.yml</code>。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">sidebar:</span> <span class="literal">true</span>   <span class="comment"># whether or not using Sidebar.</span></span><br><span class="line"><span class="attr">sidebar-about-description:</span> <span class="string">&quot;I don&#x27;t know where I am going ,but I am on my way...&quot;</span></span><br><span class="line"><span class="attr">sidebar-avatar:</span> <span class="string">img/avatar/vincnet.jpg</span>    <span class="comment"># use absolute URL, seeing it&#x27;s used in both `/` and `/about/`</span></span><br><span class="line"><span class="attr">widgets:</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">visitor</span>   <span class="comment"># busuanzi: https://busuanzi.ibruce.info/</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">featured-tags</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">short-about</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">recent-posts</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">friends-blog</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">archive</span></span><br><span class="line"><span class="bullet">-</span> <span class="string">category</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># widget behavior</span></span><br><span class="line"><span class="comment">## Archive</span></span><br><span class="line"><span class="attr">archive_type:</span> <span class="string">&#x27;monthly&#x27;</span></span><br><span class="line"><span class="attr">show_count:</span> <span class="literal">true</span></span><br><span class="line"></span><br><span class="line"><span class="comment">## Featured Tags</span></span><br><span class="line"><span class="attr">featured-tags:</span> <span class="literal">true</span>   <span class="comment"># whether or not using Feature-Tags</span></span><br><span class="line"><span class="attr">featured-condition-size:</span> <span class="number">0</span>    <span class="comment"># A tag will be featured if the size of it is more than this</span></span><br><span class="line"></span><br><span class="line"><span class="comment">## Friends</span></span><br><span class="line"><span class="attr">friends:</span> [</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="attr">title:</span> <span class="string">&quot;V_Vincen&quot;</span>,</span><br><span class="line">        <span class="attr">href:</span> <span class="string">&quot;https://v-vincen.life/&quot;</span></span><br><span class="line">    &#125;,&#123;</span><br><span class="line">        <span class="attr">title:</span> <span class="string">&quot;Teacher Ye&quot;</span>,</span><br><span class="line">        <span class="attr">href:</span> <span class="string">&quot;http://teacherye.com/&quot;</span></span><br><span class="line">    &#125;</span><br><span class="line">]</span><br></pre></td></tr></table></figure>
<h3 id="评论系统设置">评论系统设置</h3>
<p>Hexo-Theme-LiveMyLife 主题暂时支持三种评论方式。我使用 gitalk 为默认评论系统。</p>
<h4 id="Gitalk">Gitalk</h4>
<p>Gitalk 是基于 GitHub Issue 和 Preact 的现代化的评论组件。 有关详细的配置方法，请参考 <a target="_blank" rel="noopener" href="https://github.com/gitalk/gitalk">Gitalk</a> 官方文档。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Gitalk Settings</span></span><br><span class="line"><span class="comment"># Doc: https://github.com/gitalk/gitalk/blob/master/readme-cn.md</span></span><br><span class="line"><span class="attr">gitalk:</span></span><br><span class="line">  <span class="attr">owner:</span>                          <span class="comment"># &#x27;GitHub repo owner&#x27;</span></span><br><span class="line">  <span class="attr">admin:</span>                          <span class="comment"># [&#x27;GitHub repo owner and collaborators, only these guys can initialize github issues&#x27;]</span></span><br><span class="line">  <span class="attr">repo:</span>                           <span class="comment"># &#x27;GitHub repo&#x27;</span></span><br><span class="line">  <span class="attr">clientID:</span>                       <span class="comment"># &#x27;GitHub Application Client ID&#x27;</span></span><br><span class="line">  <span class="attr">clientSecret:</span>                   <span class="comment"># &#x27;GitHub Application Client Secret&#x27;</span></span><br><span class="line">  <span class="attr">perPage:</span> <span class="number">10</span>                     <span class="comment"># Pagination size, with maximum 100.</span></span><br><span class="line">  <span class="attr">pagerDirection:</span> <span class="string">last</span>            <span class="comment"># Comment sorting direction, available values are last and first.</span></span><br><span class="line">  <span class="attr">createIssueManually:</span> <span class="literal">false</span>      <span class="comment"># By default, Gitalk will create a corresponding github issue for your every single page automatically when the logined user is belong to the admin users. You can create it manually by setting this option to true</span></span><br><span class="line">  <span class="attr">language:</span> <span class="string">en</span>                    <span class="comment"># Localization language key, en, zh-CN and zh-TW are currently available.</span></span><br><span class="line">  <span class="attr">maxCommentHeight:</span> <span class="number">250</span>           <span class="comment"># An optional number to limit comments&#x27; max height, over which comments will be folded.Default 250.</span></span><br><span class="line">  <span class="attr">proxy:</span> <span class="string">https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token</span>                         <span class="comment"># GitHub oauth request reverse proxy for CORS. For example, the demo url is &#x27;https://cors-anywhere.herokuapp.com/https://github.com/login/oauth/access_token&#x27;.You should deploy your own proxy url as in this issue https://github.com/gitalk/gitalk/issues/429.</span></span><br></pre></td></tr></table></figure>
<h4 id="Gitment">Gitment</h4>
<p>Gitment 是一个基于 GitHub Issues 的评论系统，可以在前端使用它，而无需任何服务器端实现。有关详细的配置方法，请参见 <a target="_blank" rel="noopener" href="https://github.com/imsun/gitment">Gitment</a> 官方文档。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">## Gitment Settings</span></span><br><span class="line"><span class="comment">## Doc: https://github.com/imsun/gitment</span></span><br><span class="line"><span class="attr">gitment:</span></span><br><span class="line">  <span class="attr">owner:</span>                          <span class="comment"># Your GitHub ID. Required.</span></span><br><span class="line">  <span class="attr">repo:</span>                           <span class="comment"># The repository to store your comments. Make sure you&#x27;re repo&#x27;s owner. Required.</span></span><br><span class="line">  <span class="attr">client_id:</span>                      <span class="comment"># GitHub client ID. Required.</span></span><br><span class="line">  <span class="attr">client_secret:</span>                  <span class="comment"># GitHub client secret. Required.</span></span><br><span class="line">  <span class="attr">desc:</span>                           <span class="comment"># An optional description for your page, used in issue&#x27;s body. Default &#x27;&#x27;.</span></span><br><span class="line">  <span class="attr">perPage:</span> <span class="number">10</span>                     <span class="comment"># An optional number to which comments will be paginated. Default 20.</span></span><br><span class="line">  <span class="attr">maxCommentHeight:</span> <span class="number">250</span>           <span class="comment"># An optional number to limit comments&#x27; max height, over which comments will be folded. Default 250.</span></span><br></pre></td></tr></table></figure>
<h4 id="Disqus">Disqus</h4>
<p>如果你想要使用 <a target="_blank" rel="noopener" href="https://disqus.com/">Disqus</a> 评论系统，则必须有代理。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Disqus settings</span></span><br><span class="line"><span class="attr">disqus_username:</span> <span class="string">your-disqus-ID</span></span><br></pre></td></tr></table></figure>
<h3 id="站点分析设置">站点分析设置</h3>
<p>如何配置站点分析? -&gt; 文档：<a target="_blank" rel="noopener" href="https://v-vincen.github.io/en/Analytics-and-Sitemap-Settings/">Analytics and Sitemap Settings</a></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Analytics settings</span></span><br><span class="line"><span class="comment"># Google Analytics</span></span><br><span class="line"><span class="attr">ga_track_id:</span> <span class="string">UA-xxxxxx-xx</span>   <span class="comment"># Format: UA-xxxxxx-xx</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Baidu Analytics</span></span><br><span class="line"><span class="attr">ba_track_id:</span> <span class="string">ba_track_id</span></span><br></pre></td></tr></table></figure>
<h3 id="站点地图设置">站点地图设置</h3>
<p>如何配置站点地图? -&gt; 文档：<a target="_blank" rel="noopener" href="https://v-vincen.github.io/en/Analytics-and-Sitemap-Settings/">Analytics and Sitemap Settings</a></p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Google sitemap</span></span><br><span class="line"><span class="attr">sitemap:</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">sitemap.xml</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Baidu sitemap</span></span><br><span class="line"><span class="attr">baidusitemap:</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">baidusitemap.xml</span></span><br><span class="line"></span><br><span class="line"><span class="attr">baidu_push:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<h3 id="置顶图标设置">置顶图标设置</h3>
<p>我使用的置顶图标是键头，你可以在 <code>sourcre/css/images</code> 目录下替换你自己想要的图标。</p>
<h3 id="文章标签">文章标签</h3>
<p>您可以选择是否显示博文标签。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">home_posts_tag:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<p><em>案例：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/home_posts_tag-true.png" alt="home_posts_tag-true"></p>
<h3 id="Markdown-渲染器">Markdown 渲染器</h3>
<p>我使用的 markdown 渲染引擎插件是 <a target="_blank" rel="noopener" href="https://github.com/celsomiranda/hexo-renderer-markdown-it">hexo-renderer-markdown-it</a>。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Markdown-it config</span></span><br><span class="line"><span class="comment">## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki</span></span><br><span class="line"><span class="attr">markdown:</span></span><br><span class="line">  <span class="attr">render:</span></span><br><span class="line">    <span class="attr">html:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">xhtmlOut:</span> <span class="literal">false</span></span><br><span class="line">    <span class="attr">breaks:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">linkify:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">typographer:</span> <span class="literal">true</span></span><br><span class="line">    <span class="attr">quotes:</span> <span class="string">&#x27;“”‘’&#x27;</span></span><br></pre></td></tr></table></figure>
<h3 id="安装-Mathjax（数学公式渲染器）">安装 Mathjax（数学公式渲染器）</h3>
<p>要安装 Mathjax，请单击 <a target="_blank" rel="noopener" href="https://v-vincen.github.io/en/How-to-Use-Mathjax/">How to Use Mathjax</a>  以获取详细的教程。</p>
<h3 id="Anchorjs（锚点）设置">Anchorjs（锚点）设置</h3>
<p>如果你想要更改文章目录标题前部的锚点 “❡”，则可以到 <code>layout/_partial/anchorjs.ejs</code> 目录下进行更改。如何使用 anchorjs，请参阅 <a target="_blank" rel="noopener" href="https://www.bryanbraun.com/anchorjs/#examples">AnchorJS</a> 以获取详细示例。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Anchorjs Settings</span></span><br><span class="line"><span class="attr">anchorjs:</span> <span class="literal">true</span>    <span class="comment"># if you want to customize anchor. check out line:26 of `anchorjs.ejs`</span></span><br></pre></td></tr></table></figure>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">async</span>(<span class="string">&quot;//cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js&quot;</span>,<span class="function"><span class="keyword">function</span>(<span class="params"></span>)</span>&#123;</span><br><span class="line">        anchors.options = &#123;</span><br><span class="line">          <span class="attr">visible</span>: <span class="string">&#x27;hover&#x27;</span>,</span><br><span class="line">          <span class="attr">placement</span>: <span class="string">&#x27;left&#x27;</span>,</span><br><span class="line">          <span class="attr">icon</span>: <span class="string">&#x27;❡&#x27;</span></span><br><span class="line">          <span class="comment">// icon: &#x27;ℬ&#x27;</span></span><br><span class="line">        &#125;;</span><br><span class="line">        anchors.add().remove(<span class="string">&#x27;.intro-header h1&#x27;</span>).remove(<span class="string">&#x27;.subheading&#x27;</span>).remove(<span class="string">&#x27;.sidebar-container h5&#x27;</span>);</span><br><span class="line">    &#125;)</span><br></pre></td></tr></table></figure>
<h3 id="博文置顶">博文置顶</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># article top</span></span><br><span class="line"><span class="attr">top:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<p>Hexo-theme-livemylife 主题添加了文章顶部功能，只要在您的 markdown 笔记中添加属性<code>sticky: number</code> 配置，文章按此数字排序。<br>
<em>案例：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/top.png" alt="top"></p>
<h3 id="文章字数统计设置">文章字数统计设置</h3>
<p>WordCount 是 Hexo 的文章字数统计插件. 有关详细的配置方法，请参见 <a target="_blank" rel="noopener" href="https://github.com/willin/hexo-wordcount">WordCount</a> 文档。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Dependencies: https://github.com/willin/hexo-wordcount</span></span><br><span class="line"><span class="comment"># Docs: https://www.npmjs.com/package/hexo-wordcount</span></span><br><span class="line"><span class="attr">wordcount:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<h3 id="Busuanzi（不蒜子）设置">Busuanzi（不蒜子）设置</h3>
<p>Busuanzi 是一个网站流量统计插件。如何使用 Busuanzi，有关详细示例，请参见 <a target="_blank" rel="noopener" href="https://ibruce.info/2015/04/04/busuanzi/">Busuanzi</a> 文档。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">## Dependencies: https://busuanzi.ibruce.info/</span></span><br><span class="line"><span class="comment">## Docs: https://ibruce.info/</span></span><br><span class="line"><span class="attr">busuanzi:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<h3 id="顶部滚动进度条设置">顶部滚动进度条设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># top scroll progress</span></span><br><span class="line"><span class="attr">scroll:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<h3 id="著作权声明设置">著作权声明设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">tip:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">copyright:</span> <span class="string">Say</span> <span class="string">what</span> <span class="string">you</span> <span class="string">think...</span> <span class="comment"># If the copyright is blank, the default value will be used.</span></span><br></pre></td></tr></table></figure>
<h3 id="社交分享博文设置">社交分享博文设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">#Docs: https://github.com/overtrue/share.js</span></span><br><span class="line"><span class="attr">share:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<h3 id="Viewer（图片预览）设置">Viewer（图片预览）设置</h3>
<p>Viewer 是一个简单的 jQuery 图片预览插件. 让我们首先看一个 <a target="_blank" rel="noopener" href="https://fengyuanchen.github.io/viewer/">demo</a>。有关详细配置，请参见 <a target="_blank" rel="noopener" href="https://github.com/fengyuanchen/viewer">Viewer</a> 官方文档。 如果要修改 Viewer 的 <a target="_blank" rel="noopener" href="https://github.com/fengyuanchen/viewerjs#options">options</a> 设置，则可以到 <code>sourcre/js/viewer/pic-viewer.js</code> 目录下修改。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Viewer config</span></span><br><span class="line"><span class="attr">viewer:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<h3 id="主题模式设置">主题模式设置</h3>
<p>Hexo-Theme-LiveMyLife 主题暂时支持两种主题模式。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># ThemeColor config</span></span><br><span class="line"><span class="attr">themecolor:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">mode:</span> <span class="string">dark</span> <span class="comment"># themecolor mode light or dark, default light</span></span><br></pre></td></tr></table></figure>
<p><em>明亮主题模式预览：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/light.png" alt="light theme"></p>
<p><em>黑暗主题模式预览：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/dark.png" alt="dark theme"></p>
<h3 id="鼠标点击效果设置">鼠标点击效果设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Mouseclick config</span></span><br><span class="line"><span class="attr">mouseclick:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">content:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">The</span> <span class="string">first</span> <span class="string">step</span> <span class="string">is</span> <span class="string">as</span> <span class="string">good</span> <span class="string">as</span> <span class="string">half</span> <span class="string">over...</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">Laugh</span> <span class="string">and</span> <span class="string">grow</span> <span class="string">fat...</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">Man</span> <span class="string">proposes</span> <span class="string">God</span> <span class="string">disposes...</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">When</span> <span class="string">all</span> <span class="string">else</span> <span class="string">is</span> <span class="string">lost</span> <span class="string">the</span> <span class="string">future</span> <span class="string">still</span> <span class="string">remains...</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">Wasting</span> <span class="string">time</span> <span class="string">is</span> <span class="string">robbing</span> <span class="string">oneself...</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">Sharp</span> <span class="string">tools</span> <span class="string">make</span> <span class="string">good</span> <span class="string">work...</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">Cease</span> <span class="string">to</span> <span class="string">struggle</span> <span class="string">and</span> <span class="string">you</span> <span class="string">cease</span> <span class="string">to</span> <span class="string">live...</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">A</span> <span class="string">friend</span> <span class="string">in</span> <span class="string">need</span> <span class="string">is</span> <span class="string">a</span> <span class="string">friend</span> <span class="string">indeed...</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">Faith</span> <span class="string">can</span> <span class="string">move</span> <span class="string">mountains...</span></span><br><span class="line">  <span class="attr">color:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#9933CC&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#339933&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#66CCCC&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#FF99CC&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#CCCCFF&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#6666CC&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#663399&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#66CC99&#x27;</span></span><br><span class="line">    <span class="bullet">-</span> <span class="string">&#x27;#FF0033&#x27;</span></span><br></pre></td></tr></table></figure>
<p><em>鼠标点击效果预览：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/mouseclick.png" alt="mouseclick"></p>
<h3 id="背景绸带效果设置">背景绸带效果设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">ribbonDynamic:</span> <span class="literal">true</span></span><br></pre></td></tr></table></figure>
<p><em>背景绸带效果预览：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/ribbon.png" alt="ribbon"></p>
<h3 id="背景线画布效果设置">背景线画布效果设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">bglinecanvas:</span> <span class="literal">true</span>  <span class="comment"># The special effects will take up a lot of cpu resorces, please open it carefully.</span></span><br></pre></td></tr></table></figure>
<p><em>背景线画布效果预览：</em></p>
<p><img src="/source/_posts/en/Hexo-Theme-LiveMyLife/bglinecanvas.png" alt="bglinecanvas"></p>
<h3 id="搜索设置">搜索设置</h3>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Dependencies: https://github.com/V-Vincen/hexo-generator-zip-search</span></span><br><span class="line"><span class="attr">search:</span></span><br><span class="line">  <span class="attr">enable:</span> <span class="literal">true</span></span><br><span class="line">  <span class="attr">path:</span> <span class="string">search.json</span></span><br><span class="line">  <span class="attr">zipPath:</span> <span class="string">search.flv</span></span><br><span class="line">  <span class="attr">versionPath:</span> <span class="string">searchVersion.json</span></span><br><span class="line">  <span class="attr">field:</span> <span class="string">post</span></span><br><span class="line">  <span class="comment"># if auto, trigger search by changing input</span></span><br><span class="line">  <span class="comment"># if manual, trigger search by pressing enter key or search button</span></span><br><span class="line">  <span class="attr">trigger:</span> <span class="string">auto</span></span><br><span class="line">  <span class="comment"># show top n results per article, show all results by setting to -1</span></span><br><span class="line">  <span class="attr">top_n_per_article:</span> <span class="number">1</span></span><br></pre></td></tr></table></figure>
<h3 id="Gitter（聊天室）">Gitter（聊天室）</h3>
<p>Gitter 是一个聊天和网络平台，通过消息、内容和发现，帮助管理、发展和连接社区。 详细配置方法请查看 <a target="_blank" rel="noopener" href="https://gitter.im/">Gitter</a> 官方文档。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">## Docs:https://gitter.im/?utm_source=left-menu-logo</span></span><br><span class="line"><span class="comment">##</span></span><br><span class="line"><span class="attr">gitter:</span></span><br><span class="line">  <span class="attr">room:</span> <span class="string">your-community/your-room</span></span><br></pre></td></tr></table></figure>
<h3 id="部署">部署</h3>
<p>替换为你自己的仓库地址。</p>
<figure class="highlight yml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">deploy:</span></span><br><span class="line">  <span class="attr">type:</span> <span class="string">git</span></span><br><span class="line">  <span class="attr">repo:</span> <span class="string">https://github.com/&lt;yourAccount&gt;/&lt;repo&gt;</span> <span class="comment"># or https://gitee.com/&lt;yourAccount&gt;/&lt;repo&gt;</span></span><br><span class="line">  <span class="attr">branch:</span> <span class="string">&lt;your-branch&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="Hexo-常用命令">Hexo 常用命令</h2>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">hexo new post <span class="string">&quot;&lt;post name&gt;&quot;</span>   <span class="comment"># you can change post to another layout if you want</span></span><br><span class="line">hexo clean &amp;&amp; hexo generate   <span class="comment"># generate the static file</span></span><br><span class="line">hexo server   <span class="comment"># run hexo in local environment</span></span><br><span class="line">hexo deploy   <span class="comment"># hexo will push the static files automatically into the specific branch(gh-pages) of your repo!</span></span><br></pre></td></tr></table></figure>
<h2 id="有一个好的体验">有一个好的体验 ^_^</h2>
<p>如果你喜欢该主题，请 <a target="_blank" rel="noopener" href="https://gitee.com/ifyyf/blog-by-hexo">Star</a>！不胜感激你的 <a target="_blank" rel="noopener" href="https://gitee.com/ifyyf">Follow</a>！比心！</p>


        <hr>
        <!-- Pager -->
        <ul class="pager">
          
          <li class="previous">
            <a href="/en/ElasticSearch笔记/" data-toggle="tooltip" data-placement="top" title="ElasticSearch笔记">&larr; Previous Post</a>
          </li>
          
          
          <li class="next">
            <a href="/en/单例模式笔记/" data-toggle="tooltip" data-placement="top" title="单例模式笔记">Next Post &rarr;</a>
          </li>
          
        </ul>

        
        <!-- tip start -->
        <!-- tip -->
<!-- tip start -->
<div class="tip">
  <p>
    
      本个人博客提供的内容仅用于个人学习，不保证内容的正确性。通过使用本站内容随之而来的风险与本站无关！
    
  </p>
</div>
<!-- tip end -->

        <!-- tip end -->
        

        
        <!-- Sharing Srtart -->
        <!-- Social Social Share Post -->
<!-- Docs:https://github.com/overtrue/share.js -->

<div class="social-share" data-initialized="true" data-disabled="tencent ,douban ,qzone ,linkedin ,facebook ,google ,diandian" data-wechat-qrcode-helper="" align="center">
  <ul class="list-inline text-center social-share-ul">
    <li class="social-share-li">
      <a target="_blank" class="social-share-icon icon-twitter">
        <i class="fa fa-twitter fa-1x" aria-hidden="true"></i>
      </a>
    </li>
    <li class="social-share-li">
      <a class="social-share-icon icon-wechat">
        <i class="fa fa-weixin fa-1x" aria-hidden="true"></i>
      </a>
    </li>
    <li class="social-share-li">
      <a target="_blank" class="social-share-icon icon-weibo">
        <i class="fa fa-weibo fa-1x" aria-hidden="true"></i>
      </a>
    </li>
    <li class="social-share-li">
      <a target="_blank" class="social-share-icon icon-qq">
        <i class="fa fa-qq fa-1x" aria-hidden="true"></i>
      </a>
    </li>
    <li class="social-share-li">
      <a target="_blank" class="social-share-icon" href="mailto:?subject=Hexo-Theme-LiveMyLife&body=Hi,I found this website and thought you might like it https://ifyyf.gitee.io/cn/Hexo-Theme-LiveMyLife/">
        <i class="fa fa-envelope fa-1x" aria-hidden="true"></i>
      </a>
    </li>
  </ul>
</div>

<!-- css & js -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/css/share.min.css"> -->
<script defer="defer" async="true" src="https://cdnjs.cloudflare.com/ajax/libs/social-share.js/1.0.16/js/social-share.min.js"></script>

        <!-- Sharing End -->
        
        <hr>

        <!-- comments start -->
        <!-- 1. gitalk comment -->


<!-- 2. gitment comment -->


<!-- 3. disqus comment -->


        <!-- comments end -->
        <hr>

      </div>

      <!-- Catalog: Tabe of Content -->
      <!-- Table of Contents -->

    
      <aside id="sidebar">
        <div id="toc" class="toc-article">
        <strong class="toc-title">目录</strong>
        
          <ol class="toc-nav"><li class="toc-nav-item toc-nav-level-1"><a class="toc-nav-link"><span class="toc-nav-number">1.</span> <span class="toc-nav-text">Hexo-Theme-LiveMyLife</span></a><ol class="toc-nav-child"><li class="toc-nav-item toc-nav-level-2"><a class="toc-nav-link" href="#%E4%BB%93%E5%BA%93"><span class="toc-nav-number">1.1.</span> <span class="toc-nav-text">仓库</span></a><ol class="toc-nav-child"><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E9%A2%84%E8%A7%88%E5%8D%9A%E5%AE%A2-%E2%9E%BE"><span class="toc-nav-number">1.1.1.</span> <span class="toc-nav-text">预览博客 ➾</span></a></li></ol></li><li class="toc-nav-item toc-nav-level-2"><a class="toc-nav-link" href="#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B"><span class="toc-nav-number">1.2.</span> <span class="toc-nav-text">快速开始</span></a><ol class="toc-nav-child"><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E5%AE%89%E8%A3%85-Node-js-%E5%92%8C-Git"><span class="toc-nav-number">1.2.1.</span> <span class="toc-nav-text">安装 Node.js 和 Git</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E5%AE%89%E8%A3%85-Hexo"><span class="toc-nav-number">1.2.2.</span> <span class="toc-nav-text">安装 Hexo</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E8%AE%BE%E7%BD%AE%E4%BD%A0%E7%9A%84%E5%8D%9A%E5%AE%A2"><span class="toc-nav-number">1.2.3.</span> <span class="toc-nav-text">设置你的博客</span></a></li></ol></li><li class="toc-nav-item toc-nav-level-2"><a class="toc-nav-link" href="#%E4%B8%BB%E9%A2%98%E4%BD%BF%E7%94%A8"><span class="toc-nav-number">1.3.</span> <span class="toc-nav-text">主题使用</span></a><ol class="toc-nav-child"><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E5%88%9D%E5%A7%8B%E5%8C%96"><span class="toc-nav-number">1.3.1.</span> <span class="toc-nav-text">初始化</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E8%AE%BE%E7%BD%AE%E4%B8%BB%E9%A2%98"><span class="toc-nav-number">1.3.2.</span> <span class="toc-nav-text">设置主题</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E5%90%AF%E5%8A%A8%E6%9C%8D%E5%8A%A1"><span class="toc-nav-number">1.3.3.</span> <span class="toc-nav-text">启动服务</span></a></li></ol></li><li class="toc-nav-item toc-nav-level-2"><a class="toc-nav-link" href="#%E9%85%8D%E7%BD%AE"><span class="toc-nav-number">1.4.</span> <span class="toc-nav-text">配置</span></a><ol class="toc-nav-child"><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%BD%91%E5%9D%80%E4%BF%A1%E6%81%AF%E9%85%8D%E7%BD%AE"><span class="toc-nav-number">1.4.1.</span> <span class="toc-nav-text">网址信息配置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E8%AF%AD%E8%A8%80%E5%9B%BD%E9%99%85%E5%8C%96-i18n"><span class="toc-nav-number">1.4.2.</span> <span class="toc-nav-text">语言国际化 (i18n)</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#CDN-%E9%85%8D%E7%BD%AE"><span class="toc-nav-number">1.4.3.</span> <span class="toc-nav-text">CDN 配置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%AB%99%E7%82%B9%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.4.</span> <span class="toc-nav-text">站点设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%BD%91%E7%AB%99%E5%9B%BE%E6%A0%87%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.5.</span> <span class="toc-nav-text">网站图标设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%AD%BE%E5%90%8D%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.6.</span> <span class="toc-nav-text">签名设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E6%B3%A2%E6%B5%AA%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.7.</span> <span class="toc-nav-text">波浪设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%A4%BE%E4%BA%A4%E7%BD%91%E7%BB%9C%E6%9C%8D%E5%8A%A1%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.8.</span> <span class="toc-nav-text">社交网络服务设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E4%BE%A7%E8%BE%B9%E6%A0%8F%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.9.</span> <span class="toc-nav-text">侧边栏设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E8%AF%84%E8%AE%BA%E7%B3%BB%E7%BB%9F%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.10.</span> <span class="toc-nav-text">评论系统设置</span></a><ol class="toc-nav-child"><li class="toc-nav-item toc-nav-level-4"><a class="toc-nav-link" href="#Gitalk"><span class="toc-nav-number">1.4.10.1.</span> <span class="toc-nav-text">Gitalk</span></a></li><li class="toc-nav-item toc-nav-level-4"><a class="toc-nav-link" href="#Gitment"><span class="toc-nav-number">1.4.10.2.</span> <span class="toc-nav-text">Gitment</span></a></li><li class="toc-nav-item toc-nav-level-4"><a class="toc-nav-link" href="#Disqus"><span class="toc-nav-number">1.4.10.3.</span> <span class="toc-nav-text">Disqus</span></a></li></ol></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%AB%99%E7%82%B9%E5%88%86%E6%9E%90%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.11.</span> <span class="toc-nav-text">站点分析设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%AB%99%E7%82%B9%E5%9C%B0%E5%9B%BE%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.12.</span> <span class="toc-nav-text">站点地图设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%BD%AE%E9%A1%B6%E5%9B%BE%E6%A0%87%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.13.</span> <span class="toc-nav-text">置顶图标设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E6%96%87%E7%AB%A0%E6%A0%87%E7%AD%BE"><span class="toc-nav-number">1.4.14.</span> <span class="toc-nav-text">文章标签</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#Markdown-%E6%B8%B2%E6%9F%93%E5%99%A8"><span class="toc-nav-number">1.4.15.</span> <span class="toc-nav-text">Markdown 渲染器</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E5%AE%89%E8%A3%85-Mathjax%EF%BC%88%E6%95%B0%E5%AD%A6%E5%85%AC%E5%BC%8F%E6%B8%B2%E6%9F%93%E5%99%A8%EF%BC%89"><span class="toc-nav-number">1.4.16.</span> <span class="toc-nav-text">安装 Mathjax（数学公式渲染器）</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#Anchorjs%EF%BC%88%E9%94%9A%E7%82%B9%EF%BC%89%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.17.</span> <span class="toc-nav-text">Anchorjs（锚点）设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E5%8D%9A%E6%96%87%E7%BD%AE%E9%A1%B6"><span class="toc-nav-number">1.4.18.</span> <span class="toc-nav-text">博文置顶</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E6%96%87%E7%AB%A0%E5%AD%97%E6%95%B0%E7%BB%9F%E8%AE%A1%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.19.</span> <span class="toc-nav-text">文章字数统计设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#Busuanzi%EF%BC%88%E4%B8%8D%E8%92%9C%E5%AD%90%EF%BC%89%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.20.</span> <span class="toc-nav-text">Busuanzi（不蒜子）设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E9%A1%B6%E9%83%A8%E6%BB%9A%E5%8A%A8%E8%BF%9B%E5%BA%A6%E6%9D%A1%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.21.</span> <span class="toc-nav-text">顶部滚动进度条设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E8%91%97%E4%BD%9C%E6%9D%83%E5%A3%B0%E6%98%8E%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.22.</span> <span class="toc-nav-text">著作权声明设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E7%A4%BE%E4%BA%A4%E5%88%86%E4%BA%AB%E5%8D%9A%E6%96%87%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.23.</span> <span class="toc-nav-text">社交分享博文设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#Viewer%EF%BC%88%E5%9B%BE%E7%89%87%E9%A2%84%E8%A7%88%EF%BC%89%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.24.</span> <span class="toc-nav-text">Viewer（图片预览）设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E4%B8%BB%E9%A2%98%E6%A8%A1%E5%BC%8F%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.25.</span> <span class="toc-nav-text">主题模式设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E9%BC%A0%E6%A0%87%E7%82%B9%E5%87%BB%E6%95%88%E6%9E%9C%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.26.</span> <span class="toc-nav-text">鼠标点击效果设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E8%83%8C%E6%99%AF%E7%BB%B8%E5%B8%A6%E6%95%88%E6%9E%9C%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.27.</span> <span class="toc-nav-text">背景绸带效果设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E8%83%8C%E6%99%AF%E7%BA%BF%E7%94%BB%E5%B8%83%E6%95%88%E6%9E%9C%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.28.</span> <span class="toc-nav-text">背景线画布效果设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E6%90%9C%E7%B4%A2%E8%AE%BE%E7%BD%AE"><span class="toc-nav-number">1.4.29.</span> <span class="toc-nav-text">搜索设置</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#Gitter%EF%BC%88%E8%81%8A%E5%A4%A9%E5%AE%A4%EF%BC%89"><span class="toc-nav-number">1.4.30.</span> <span class="toc-nav-text">Gitter（聊天室）</span></a></li><li class="toc-nav-item toc-nav-level-3"><a class="toc-nav-link" href="#%E9%83%A8%E7%BD%B2"><span class="toc-nav-number">1.4.31.</span> <span class="toc-nav-text">部署</span></a></li></ol></li><li class="toc-nav-item toc-nav-level-2"><a class="toc-nav-link" href="#Hexo-%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4"><span class="toc-nav-number">1.5.</span> <span class="toc-nav-text">Hexo 常用命令</span></a></li><li class="toc-nav-item toc-nav-level-2"><a class="toc-nav-link" href="#%E6%9C%89%E4%B8%80%E4%B8%AA%E5%A5%BD%E7%9A%84%E4%BD%93%E9%AA%8C"><span class="toc-nav-number">1.6.</span> <span class="toc-nav-text">有一个好的体验 ^_^</span></a></li></ol></li></ol>
        
        </div>
      </aside>
    



      <!-- Sidebar Container -->
      <div class="
                col-lg-8 col-lg-offset-1
                col-md-10 col-md-offset-1
                sidebar-container">

        <!-- Featured Tags -->
        
        <section>
          <!-- no hr -->
          <h5>
            <a href="/tags/">标签</a>
          </h5>
          <div class="tags">
            
          </div>
        </section>
        

        <!-- Friends Blog -->
        
        <hr>
        <h5>友情链接</h5>
        <ul class="list-inline">

          
          <li>
            <a href="http://freeprogramming.cn/" target="_blank">自由编程协会</a>
          </li>
          
          <li>
            <a href="https://hexo.io/" target="_blank">Hexo框架官网</a>
          </li>
          
        </ul>
        
      </div>
    </div>
  </div>
</article>



<!-- anchorjs start -->
<!-- async load function -->
<!-- anchor-js, Doc:http://bryanbraun.github.io/anchorjs/ -->
<script type="text/javascript">
  // async load function
  function async (u, c) {
    var d = document,
      t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) {
      o.addEventListener('load', function(e) {
        c(null, e);
      }, false);
    }
    s.parentNode.insertBefore(o, s);
  };
</script>
<script type="text/javascript">
  //anchor-js, Doc:http://bryanbraun.github.io/anchorjs/
  async ("https://cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js", function() {
    anchors.options = {
      visible: 'hover',
      placement: 'left',
      // icon: 'ℬ'
      icon: '❡'
    };
    anchors.add().remove('.intro-header h1').remove('.subheading').remove('.sidebar-container h5');
  });
</script>
<style>
  /* place left on bigger screen */
  @media all and (min-width: 800px) {
    .anchorjs-link {
      position: absolute;
      left: -0.75em;
      font-size: 1.1em;
      margin-top: -0.1em;
    }
  }
</style>

<!-- anchorjs end -->



		<!-- Footer (contains ThemeColor、viewer) -->
		<!-- Footer -->
<footer>
  <div class="container">
    <div class="row">
      <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
        <ul class="list-inline text-center">
          

          
            <li>
              <a target="_blank" href="https://github.com/ifyyf">
                <span class="fa-stack fa-lg">
                  <i class="fa fa-github-square"></i>
                </span>
              </a>
            </li>
          
        
            <li>
              <a target="_blank" href="https://gitee.com/ifyyf">
                <span class="fa-stack fa-lg">

                  <i class="fa fa-git-square"></i>
                </span>
              </a>
            </li>
          

          
          <li>
            <a target="_blank" href="https://blog.csdn.net/jay_chou345">
              <span class="fa-stack fa-lg">

                <i class="fa fa-pencil-square"></i>
              </span>
            </a>
          </li>
        

        
          <li>
            <a target="_blank" href="https://wpa.qq.com/msgrd?v=3&site=qq&menu=yes&uin=346313208">
              <span class="fa-stack fa-lg">

                <i class="fa fa-qq"></i>
              </span>
            </a>
          </li>
        

          

          

          

          

          

          

        </ul>
        <p class="copyright text-muted">
          Copyright &copy;
          if
          2021
          <br>
        </p>

        <div style="text-align:center;font-size:15px">
            <a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index">
                <p style="color:#939393;margin:0px;padding:0px;">湘ICP备 2020022350号</p>
            </a>
            <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=43022102000116">
                <p style="color:#939393;margin:0px;padding:0px;">湘公网安备 43022102000116号</p>
            </a>
        </div>
      </div>
    </div>
  </div>
</footer>

<a id="rocket" href="#top" class=""></a>


  <!-- jQuery -->
  <script type="text/javascript" src="/js/jquery.min.js"></script>
  <!-- Bootstrap Core JavaScript -->
  <script type="text/javascript" src="/js/bootstrap.min.js"></script>
  <!-- Custom Theme JavaScript -->
  <script type="text/javascript" src="/js/hux-blog.min.js"></script>
  <!-- catalog -->
  <script async="true" type="text/javascript" src="/js/catalog.js"></script>
  <!-- totop(rocket) -->
  <script async="true" type="text/javascript" src="/js/totop.js"></script>

  

  
    <!-- Scroll start -->
    <script async="async" type="text/javascript" src="/js/scroll.js"></script>
    <!-- Scroll end -->
  

  
    <!-- LangSelect start -->
    <script type="text/javascript" src="/js/langselect.js"></script>
    <!-- LangSelect end -->
  

  
    <!-- Mouseclick -->
    <script type="text/javascript" src="/js/mouseclick.js" content='' color=''></script>
  

  
    <!-- ribbon -->
    <script type="text/javascript" src="/js/ribbonDynamic.js"></script>
  

  






  <!-- viewer start -->
  <!-- viewer start (Picture preview) -->
  
    <script async="async" type="text/javascript" src="/js/viewer/viewer.min.js"></script>
    <script async="async" type="text/javascript" src="/js/viewer/pic-viewer.js"></script>
  

  <!-- viewer end -->


<script>
  // async load function
  function async (u, c) {
    var d = document,
      t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) {
      o.addEventListener('load', function (e) {
        c(null, e);
      }, false);
    }
    s.parentNode.insertBefore(o, s);
  }

  // fastClick.js
  async ("https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function () {
    var $nav = document.querySelector("nav");
    if ($nav)
      FastClick.attach($nav);
    }
  )
</script>

<!-- Because of the native support for backtick-style fenced code blocks right within the Markdown is landed in Github Pages, From V1.6, There is no need for Highlight.js, so Huxblog drops it officially. -
https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0 - https://help.github.com/articles/creating-and-highlighting-code-blocks/ -->
<!-- <script> async ("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function () { hljs.initHighlightingOnLoad(); }) </script> <link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet"> -->

<!-- jquery.tagcloud.js -->
<!-- <script> // only load tagcloud.js in tag.html if ($('#tag_cloud').length !== 0) { async ("https://ifyyf.gitee.io/js/jquery.tagcloud.js", function () { $.fn.tagcloud.defaults = { // size: { start: 1, end: 1, unit: 'em' }, color: {
start: '#bbbbee', end: '#0085a1' } }; $('#tag_cloud a').tagcloud(); }) } </script> -->


		<!-- Search -->
		
		<div class="popup search-popup local-search-popup">
  <span class="popup-btn-close">
    ESC
  </span>
  <div class="container">
    <div class="row">
      <!-- <div class="col-md-9 col-md-offset-1"> -->
      <div class="col-lg-9 col-lg-offset-1 col-md-10 col-md-offset-1 local-search-content">

        <div class="local-search-header clearfix">

          <div class="local-search-input-wrapper">
            <span class="search-icon">
              <i class="fa fa-search fa-lg" style="margin: 25px 10px 25px 20px;"></i>
            </span>
            <input autocomplete="off" placeholder="搜索..." type="text" id="local-search-input">
          </div>
        </div>
        <div id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>


  
    <script src="/js/ziploader.js"></script>
  
  <script>
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.json";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    // monitor main search box;
    var onPopupClose = function (e) {
      $('.popup').fadeOut(300);
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $('.popup').fadeIn(300);
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }
    // get search zip version
    $.get('/searchVersion.json?t=' + (+new Date()), function (res) {
      if (localStorage.getItem('searchVersion') !== res) {
        localStorage.setItem('searchVersion', res);
        initSearchJson();
      }
    });

    function initSearchJson() {
      initLoad(['/search.flv'], {
        loadOptions: {
          success: function (obj) {
            localStorage.setItem('searchJson', obj['search.json'])
          },
          error: function (e) {
            return console.log(e)
          }
        },
        returnOptions: {
          'json': TYPE_TEXT
        },
        mimeOptions: {
          'json': 'application/json'
        }
      })
    }
    // search function;
    var searchFunc = function (search_id, content_id) {
      'use strict';
      isfetched = true;
      var datas = JSON.parse(localStorage.getItem('searchJson'));
      // console.log(search_id)
      var input = document.getElementById(search_id);
      var resultContent = document.getElementById(content_id);
      var inputEventFunction = function () {
        var searchText = input.value.trim().toLowerCase();
        var keywords = searchText.split(/[\s\-]+/);
        if (keywords.length > 1) {
          keywords.push(searchText);
        }
        var resultItems = [];
        if (searchText.length > 0) {
          // perform local searching
          datas.forEach(function (data) {
            var isMatch = false;
            var hitCount = 0;
            var searchTextCount = 0;
            var title = data.title
              ? data.title.trim()
              : '';
            var titleInLowerCase = title.toLowerCase();
            var content = data.content
              ? data.content.trim().replace(/<[^>]+>/g, "")
              : '';
            var contentInLowerCase = content.toLowerCase();
            var articleUrl = decodeURIComponent(data.url);

            var date = data.date;
            var dateTime = date.replace(/T/, " ").replace(/.000Z/, "");
            var imgUrl = data.header_img;
            


            var indexOfTitle = [];
            var indexOfContent = [];
            // only match articles with not empty titles
            keywords.forEach(function (keyword) {
              function getIndexByWord(word, text, caseSensitive) {
                var wordLen = word.length;
                if (wordLen === 0) {
                  return [];
                }
                var startPosition = 0,
                  position = [],
                  index = [];
                if (!caseSensitive) {
                  text = text.toLowerCase();
                  word = word.toLowerCase();
                }
                while ((position = text.indexOf(word, startPosition)) > -1) {
                  index.push({position: position, word: word});
                  startPosition = position + wordLen;
                }
                return index;
              }
              indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
              indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
            });
            if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
              isMatch = true;
              hitCount = indexOfTitle.length + indexOfContent.length;
            }
            // show search results
            if (isMatch) {
              // sort index by position of keyword
              [indexOfTitle, indexOfContent].forEach(function (index) {
                index.sort(function (itemLeft, itemRight) {
                  if (itemRight.position !== itemLeft.position) {
                    return itemRight.position - itemLeft.position;
                  } else {
                    return itemLeft.word.length - itemRight.word.length;
                  }
                });
              });
              // merge hits into slices
              function mergeIntoSlice(text, start, end, index) {
                var item = index[index.length - 1];
                var position = item.position;
                var word = item.word;
                var hits = [];
                var searchTextCountInSlice = 0;
                while (position + word.length <= end && index.length != 0) {
                  if (word === searchText) {
                    searchTextCountInSlice++;
                  }
                  hits.push({position: position, length: word.length});
                  var wordEnd = position + word.length;
                  // move to next position of hit
                  index.pop();
                  while (index.length != 0) {
                    item = index[index.length - 1];
                    position = item.position;
                    word = item.word;
                    if (wordEnd > position) {
                      index.pop();
                    } else {
                      break;
                    }
                  }
                }
                searchTextCount += searchTextCountInSlice;
                return {hits: hits, start: start, end: end, searchTextCount: searchTextCountInSlice};
              }
              var slicesOfTitle = [];
              if (indexOfTitle.length != 0) {
                slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
              }
              var slicesOfContent = [];
              while (indexOfContent.length != 0) {
                var item = indexOfContent[indexOfContent.length - 1];
                var position = item.position;
                var word = item.word;
                // cut out 100 characters
                var start = position - 20;
                var end = position + 80;
                if (start < 0) {
                  start = 0;
                }
                if (end < position + word.length) {
                  end = position + word.length;
                }
                if (end > content.length) {
                  end = content.length;
                }
                slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
              }
              // sort slices in content by search text's count and hits' count
              slicesOfContent.sort(function (sliceLeft, sliceRight) {
                if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                  return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                  return sliceRight.hits.length - sliceLeft.hits.length;
                } else {
                  return sliceLeft.start - sliceRight.start;
                }
              });
              // select top N slices in content
              var upperBound = parseInt('1');
              if (upperBound >= 0) {
                slicesOfContent = slicesOfContent.slice(0, upperBound);
              }
              // highlight title and content
              function highlightKeyword(text, slice) {
                var result = '';
                var prevEnd = slice.start;
                slice.hits.forEach(function (hit) {
                  result += text.substring(prevEnd, hit.position);
                  var end = hit.position + hit.length;
                  result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                  prevEnd = end;
                });
                result += text.substring(prevEnd, slice.end);
                return result;
              }
              var resultItem = '';

              // if (slicesOfTitle.length != 0) {   resultItem += "<li><a target='_blank' href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>"; } else {   resultItem += "<li><a target='_blank' href='" +
              // articleUrl + "' class='search-result-title'>" + title + "</a>"; } slicesOfContent.forEach(function (slice) {   resultItem += "<a target='_blank' href='" + articleUrl + "'><p class=\"search-result\">" + highlightKeyword(content, slice) +
              // "...</p></a>"; }); resultItem += "</li>";

              if (slicesOfTitle.length != 0) {
                resultItem += "<a target='_blank' href='" + articleUrl + "' class='search-result'><div class='search-result-left'><div class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</div><time class='search-result-date'>" + dateTime + "</time>";
              } else {
                resultItem += "<a target='_blank' href='" + articleUrl + "' class='search-result'><div class='search-result-left'><div class='search-result-title'>" + title + "</div><time class='search-result-date'>" + dateTime + "</time>";
              }
              slicesOfContent.forEach(function (slice) {
                resultItem += "<p class=\"search-result-content\">" + highlightKeyword(content, slice) + "...</p>";
              });
              resultItem += "</div><div class='search-result-right'><img class='media-image' src='" + imgUrl + "' width='64px' height='48px'></img></div></a>";

              resultItems.push({item: resultItem, searchTextCount: searchTextCount, hitCount: hitCount, id: resultItems.length});
            }
          })
        };

        if (keywords.length === 1 && keywords[0] === "") {
          resultContent.innerHTML = '<div id="no-result"></div>'
        } else if (resultItems.length === 0) {
          resultContent.innerHTML = '<div id="no-result"></div>'
        } else {
          resultItems.sort(function (resultLeft, resultRight) {
            if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
              return resultRight.searchTextCount - resultLeft.searchTextCount;
            } else if (resultLeft.hitCount !== resultRight.hitCount) {
              return resultRight.hitCount - resultLeft.hitCount;
            } else {
              return resultRight.id - resultLeft.id;
            }
          });
          var searchResultList = '<div class=\"search-result-list\">';
          resultItems.forEach(function (result) {
            searchResultList += result.item;
          })
          searchResultList += "</div>";
          resultContent.innerHTML = searchResultList;
        }
      }
      if ('auto' === 'auto') {
        input.addEventListener('input', inputEventFunction);
      } else {
        $('.search-icon').click(inputEventFunction);
        input.addEventListener('keypress', function (event) {
          if (event.keyCode === 13) {
            inputEventFunction();
          }
        });
      }
      // remove loading animation
      $('body').css('overflow', '');
      proceedsearch();
    }
    // handle and trigger popup window;
    $('.popup-trigger').click(function (e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc('local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });
    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function (e) {
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 && $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });

    document.addEventListener('mouseup', (e) => {
      var _con = document.querySelector(".local-search-content");
      if (_con) {
        if (!_con.contains(e.target)) {
          onPopupClose();
        }
      }
    });
  </script>


		
	<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ["$","$"], ["\\(","\\)"] ],
            skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code'],
            processEscapes: true
        }
    });
    MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax();
        for (var i = 0; i < all.length; ++i)
            all[i].SourceElement().parentNode.className += ' has-jax';
    });
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</body>
</html>
